import api from '@/api/api'
import type { IRespose } from '@/api/type'

export const myData = (param: object):Promise<IRespose> => {
    return api.post('User/index', param);
}

export const getCertificationData = (param: object):Promise<IRespose> => {
  console.log(param)
  return api.get('User/realauth', {params: param})
}

export const uploadFile = (url: string, file: any):any => {
  console.log(file, 'file')
    const config = {
      headers: { "Content-Type": "multipart/form-data" }
    };
    api.post(url, file, config).then(res => {
      console.log(res);
    });
  };
// export const  certificationData = (params: object):Promise<IRespose> => {
//     let configs = {
// 		headers:{'Content-Type':'multipart/form-data'}
//     }
//     return api.post('User/realauth', params, configs);
// }